# 基础镜像， cuda为11.0，ubuntu18.04
FROM 

# 配置程序依赖环境
RUN apt-get update && apt-get install -y --no-install-recommends \
         build-essential \
         cmake \
         curl \
	 git \
         ca-certificates \
	 libssl-dev \
	 libffi-dev \
	 libxml2 \
	 libxml2-dev \
	 libxslt1-dev \
	 zlib1g-dev \
         libjpeg-dev \
         libpng-dev \
         libgl1-mesa-glx \
         libglib2.0-dev \
	 python3-dev	\
         python3 \
         python3-pip && \
     rm -rf /var/lib/apt/lists/*


# 将程序复制到容器内的/work路径下
COPY ./work  /work


# 安装torch
RUN python3 -m pip install --upgrade pip -i https://mirrors.aliyun.com/pypi/simple/
RUN python3 -m pip install setuptools -i https://mirrors.aliyun.com/pypi/simple/
RUN pip3 install /installers/torch-1.7.1+cu110-cp36-cp36m-linux_x86_64.whl /installers/torchvision-0.8.2+cu110-cp36-cp36m-linux_x86_64.whl
RUN python3 -m pip install scikit-build -i https://mirrors.aliyun.com/pypi/simple/
RUN python3 -m pip install --upgrade pip -i https://mirrors.aliyun.com/pypi/simple/
RUN pip3 install /installers/opencv_python-4.5.1.48-cp36-cp36m-manylinux2014_x86_64.whl
RUN pip3 install /installers//matplotlib-3.3.4-cp36-cp36m-manylinux1_x86_64.whl